package com.brillilab.service.module.message.template.impl.topic;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: NotLeaderOrPIAddTopicMemberTemp
 * @ProjectName brill_lab
 * @Description: 非组长或PI的用户新增课题成员
 * @date 2019/5/28 9:19
 */
@Data
public class NotLeaderOrPIAddTopicMemberTemp extends AbstractMessageTemplate {
    private String operatorName;
    private int inviteCount;
    private String topicName;

    /**
     * 非组长或PI的用户新增课题成员
     * @param labId        实验室ID
     * @param receiverId   接收人ID
     * @param labMemberId  接收者实验室成员Id
     * @param operatorName 操作人姓名
     * @param inviteCount  邀请人数
     * @param topicName    课题名称
     * @param referId      业务关联ID
     */
    public NotLeaderOrPIAddTopicMemberTemp(Long labId, Long receiverId,Long labMemberId, String operatorName, int inviteCount, String topicName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.NotLeaderOrPIAddTopicMember.getValue());
        super.setTitle(inviteCount+"人被邀请加入课题");
        String content = String.format("<span style='color:#F6AC2D'>%s</span>" + "<span>邀请</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>人加入课题</span>" +
                        "<span style='color:#F6AC2D'>%s</span>",operatorName,inviteCount,topicName);
        super.setContent(content);
        super.setAppContent(String.format("%s邀请%s人加入课题%s",operatorName,inviteCount,topicName));
        this.labMemberId=labMemberId;
        this.operatorName = operatorName;
        this.inviteCount = inviteCount;
        this.topicName = topicName;
        this.referId = referId;
    }

}
